Docker installation and sharing of common commands and sharing of common docker commands
Basic commands
1. To install docker in yum, the root permission is required.
Yum install docker
http://segmentfault.com/a/1190000000751601This article only records the use of Docker commands in most situations, and if you want to know the details of each option, please refer to the official documentation, which is recorded only as a later memo.According to their own understanding, generally divided into the following types:
Container Life cycle Management-
Summary of common docker entry-level commands and common docker entry-level commands
1. View version information
Docker version
2. Search for images (images are generally stored by user name/image name, except for some special basic images)
one more virtual machine layer to run on a non-Linux system. This will cause some problems that will not occur on Linux (IP address, hardware resources, file mappings, etc.), and because Linux-based, some Windows programs will be acclimatized, more generic than virtual machines.But the benefit is that the system resources are much lower. A computer that can only open several virtual machines generally can open dozens of container, and the startup time of container is usually within a few second
Docker tips and Common commands and docker tipsInstall docker
Check whether the curl package is installed?which curl
If curl is not installed, update the apt source and install curl as follows:apt-get updateapt-get install curlapt-get updatewget -qO- https://get.docker.com/ | sh
Set the current user as the
Docker ~ Run multiple commands and docker multiple commands
Recently, we are working on the deployment of jenkins pipeline. you do not want to install the dotnet sdk when deploying net core. For better portability, you plan to directly use the docker image of aspnetcore and
/docker/server.pem --tlskey=/var/docker/serverkey.pem -H tcp://192.168.59.3:2376These options:
Enable -D (Debug) mode
Set to True with the tls server certificate and key specified using --tlscert and --tlskey respectively
Listen for connections ontcp://192.168.59.3:2376
The command line reference have the complete list of daemon flags with e
filesystem # view Docker container changesEvents get real time events from the server # Get container Live event from Docker serviceexec run a command in an existing container # running commands on an existing containerExport Stream the contents of a container as a tar archive# Export container's content stream as a tar archive [corresponding to import]History s
Recently studied Docker, and experimented with all of the Docker commands, with the following special finishing:# docker--helpusage:docker [OPTIONS] COMMAND [arg ...] Docker daemon [--help | ...] Docker [-H |--help |-V |--ve
839866a338db6dd626fa8eabeef53a839e4d2e2eb16ebd89679aa722c4caa5f7: (from MySQL ) StartEXEC Run a command in a running container--To perform other tasks after the container is startedThe EXEC command allows you to create two kinds of tasks: back-end tasks and interactive tasksBack-up tasks: Docker exec-d cc Touch 123 where CC is the container nameInteractive tasks:[email protected] ~]# Docker exec-i-T Cc/bin
Export container
Docker CP # Copy files or directories out of the container
Docker Export # Exports the entire file system of the container as a tar package without layers, tag, etc.
Perform
Docker EXEC # Executes a command in the container that can execute bash into interactive
Mirroring operations
Common commands can be divided into the following types1. Container life Cycle Management # Docker [Run|start|stop|restart|kill|rm|pause|unpause]2. Container Operation Ops # Docker [Ps|inspect|top|attach|events|logs|wait|export|port]3. Container rootfs Command # docker [Commit|cp|diff]4. Mirrored warehouse #
Docker is an open-source engine that makes it easy to create a lightweight, portable, self-sufficient container for any application. Developers who compile tests on notebooks can be deployed in batches in a production environment, including VMS (virtual machines), bare metal, OpenStack clusters, and other underlying application platforms.Docker is typically used for the following scenarios:Automated packaging and publishing of Web applications;Automat
What is Docker?
Docker is an open-source engine that can easily create a lightweight, portable, self-contained container for any application. Developers compiling tests on notebooks can be deployed in bulk in a production environment, including VMS, bare metal, OpenStack clusters, and other basic application platforms.Docker is typically used in the following scenarios:
Automated packaging and publishing
Docker Common Command Operations container start container
Start the container and start Bash (interactive mode):
$docker run-i-T
Start the container to run later (in a more general way):
$docker run-d-it image_namePS: The image_name here contains the tag:hello.demo.kdemo:v1.0Attaching to a container
Attaching to a running c
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.